<?php

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use App\Models\Area;

class AreaTableSeeder extends Seeder
{

    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('areas')->delete();

        Area::create(['name' => '陕西']);
        Area::create(['name' => '西安', 'p_id' => 1, 'level' => 2]);
        Area::create(['name' => '雁塔区', 'p_id' => 2, 'level' => 3]);
        Area::create(['name' => '长安区', 'p_id' => 2, 'level' => 3]);
    }

}
